<%@ page import="news.service.IQueryTopicService" %>
<%@ page import="news.service.QueryTopicServiceImpl" %>
<%@ page import="news.example.Topic" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: gongb
  Date: 2022/2/25
  Time: 16:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<style>
    .title{
        font-size: 20px;
        font-weight: bold;
        margin-top: -10px;
    }

    .con{
        font-size: 18px;
        margin-top: 20px;
        font-weight: bold;
    }
    #submit{
        width: 50px;
        height: 22px;
        border: none;
        border-radius: 10%;
        background-color: lightskyblue;
        margin-top: 20px;
    }
    #reset{
        width: 50px;
        height: 22px;
        margin-left: 10px;
        border: none;
        border-radius: 10%;
        background-color: lightskyblue;

    }
</style>

<div>
    <p class="title">修改主题</p>

    <%
        IQueryTopicService iQueryTopicService = new QueryTopicServiceImpl();
        Integer topic_id = Integer.parseInt(request.getParameter("topic_id"));
        List<Topic> list = iQueryTopicService.findNameById(topic_id);
        String topicName = "";
        topicName = list.get(0).getTopicName();
    %>
    <p class="con">主题名称：<%=topicName%>
    <form action="<%=request.getContextPath()%>/updateTopic" method="post">
    <input type="text" name="newTopicName" value="" />
    <input type="submit" value="修改"  id="submit" />
    <input type="reset" value="重置" id="reset" />
    <input type="hidden" name="topicId" value="<%=topic_id%>"/>
</form>

    </p>
</div>